import { ApiProperty } from '@nestjs/swagger';
import { IsArray, IsString } from 'class-validator';

export class SearchWordsDto {
  @ApiProperty({ description: '文本' })
  @IsString()
  text: string;
}

export class SearchWordsResDto {
  @ApiProperty({ description: '翻译' })
  @IsString()
  translation: string;

  @ApiProperty({ description: '用法' })
  @IsString()
  usage: string;
}

export class TranslateDto {
  @ApiProperty({ description: '文本列表' })
  @IsArray()
  text: string[];
}
